﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Commons.TypeUtil.ConverterTypes
{
    public class StringType : IConvertibility
    {
        private string s = "&nbsp;";

        #region IConvertibility 成员

        public object[] GetRegisterKeys()
        {
            return new object[] {typeof(string)};
        }

        public object GetValue(string strValue)
        {
            return strValue.Replace(s, " ");
        }

        public string GetValueStr(object value)
        {
            string temp = Convert.ToString(value).TrimEnd(null).Replace(" ", s);
            return temp;
        }

        #endregion
    }
}
